package com.demo;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

/**
 * SpringBootServletInitializer类实现了WebApplicationInitializer类
 * 在容器启动通过servlet3.0的SPI机制会调用SpringBootServletInitializer#onStartup方法
 * SPI机制查看 https://gitee.com/luobiao320/spring/blob/master/c05_context/web/annotation/README.md#1.1
 */
@SpringBootApplication
public class C5Application extends SpringBootServletInitializer {

    /**
     * 重写SpringBootServletInitializer#configure方法，可以对builder进行写自定义设置
     * 如果不需要自定义设置也可以不用重写
     * @param builder
     * @return
     */
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder;
    }
}
